if (sprite(the clickOn).loc = the mouseLoc) and (the clickOn <> spriteNum) then
if foundation[makesymbol(spriteNum)].getcardcount() > 0 then
if (getlist(the clickOn).rankvalue = (foundation[makesymbol(spriteNum)].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[makesymbol(spriteNum)].getlastcard().suit) then
equal = 1
currentselect = spriteNum
end if
else
if (getlist(the clickOn).rank = string(baserank)) and (getlist(the clickOn).suit = mysuit) then